home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
doc
/
homepage
/
tutorials
/
lesson2
/
conemove.wrl
< prev
next >
Wrap
Text File
|
1996-08-26
|
1KB
|
57 lines
#VRML V2.0 utf8
Viewpoint {
position 0 3 8
}
DEF CONE_TRANS Transform {
translation 0 3 0
children [
DEF TOUCH_SENSOR TouchSensor {}
Shape {
appearance Appearance {
material Material {
emissiveColor 0.5 0.5 0.5
}
}
geometry Cone { height 2 bottomRadius 1 }
}
]
}
Transform {
children [
Shape {
appearance Appearance {
material Material {
emissiveColor 0.4 0.0 1.0
}
}
geometry IndexedFaceSet {
coord Coordinate3 {
point [
10 0 10,
10 0 -10,
-10 0 -10,
-10 0 10
]
}
coordIndex [
0, 1, 2, 3, -1
]
}
}
]
}
DEF CONE_SCRIPT Script {
url "conemove.class"
scriptType "javabc"
field SFNode the_cone_trans USE CONE_TRANS
eventOut SFRotation theRot
eventIn SFBool clicked
}
ROUTE TOUCH_SENSOR.isActive TO CONE_SCRIPT.clicked
ROUTE CONE_SCRIPT.theRot TO CONE_TRANS.set_rotation